#coding:utf-8
from www.web import get
from aiohttp import web
from www.models import User

@get('/')
async def index():
    return web.Response(body=b'<h1>hello world</h1>', content_type='text/html')

@get('/user/{id}')
async def get_user(id, *, acg):
    u = await User.find(id)
    return web.Response(body='%s' % u.name, content_type='text/html')